//
//  WABMSRequest.h
//  WonderAnalyticsSDK
//
//  Created by zero on 2021/8/11.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

extern const NSString *kWonderUrl;

extern const NSString *kGetConfigHost;

extern const NSString *kGetServerUUID;

extern const NSString *kAnalyticsHost;
extern const NSString *kAnalyticsurl;

@interface WABMSRequest : NSObject

+ (instancetype)shareInstance;

+ (void)destroyInstance;


/// 获取服务器时间接口
/// @param handler 返回服务器时间
+ (void)getServerTime:(void(^)(NSUInteger serverTime))handler;


/// 发起一个post请求
/// @param urlString 请求地址
/// @param params 请求参数
/// @param handler 请求结果
+ (void)requestWithUrlString:(NSString *)urlString Params:(NSDictionary *)params CompletionHandler:(void(^)(BOOL success, NSError * _Nullable error, NSDictionary *dicData))handler;

/// 发起一个post请求
/// @param urlString 请求地址
/// @param params 请求参数
/// @param handler 请求结果
+ (void)requestWithUrlString:(NSString *)urlString Params:(NSDictionary *)params CompletionResponseHandler:(void (^)(BOOL success, NSError * _Nullable error, NSDictionary *dicData, NSHTTPURLResponse * _Nullable response))handler;


/// 发起一个get请求
/// @param urlString 请求地址
/// @param params 请求参数
/// @param handler 请求结果
+ (void)getRequestWithUrlString:(NSString *)urlString Params:(NSDictionary *)params CompletionHandler:(void(^)(BOOL success, NSError * _Nullable error, NSDictionary *dicData))handler;

@end

NS_ASSUME_NONNULL_END
